<template>
  <div>
      <p>播放页面</p>
      <audio :src="url" autoplay></audio>
  </div>
</template>

<script>
import {getUrlById} from '../http'
export default {
    data() {
        return {
            url: ''
        }
    },
    created() {
        this.getSongUrl()
    },
    methods: {
        async getSongUrl() {
            let res = await getUrlById(this.$route.params.id);
            this.url = res.data[0].url
        }
    }
}
</script>

<style>

</style>